#include <stdio.h>
#include <stdbool.h>

bool isPowerOfFour(int num) {
	int iTmpNum;
	iTmpNum = num;
    if(num > 3)
	{
		for(;iTmpNum%4 == 0; iTmpNum /= 4)
		{
			if(iTmpNum == 4)
				return true;
		}
		return false;
	}
	else
	{
		if(num == 1)
			return true;
		return false;
	}
}

int main(void)
{
	int num;
	num = 46;
	
	printf("%d\n", isPowerOfFour(num));
	return 0;
}